package top.kaoshanji.p1ch04a;

/**
 * 代码清单-p1ch04a-88页b：演示继承原理：Child类
 * author kaoshanji
 * ^_^
 * create time 2025/2/17 16:17
 */
public class Child extends Base {

    public static int s;
    private int a;

    static {
        System.out.println("子类静态代码块，s：" + s);
        s = 10;
    }

    {
        System.out.println("子类实例代码块，a：" + a);
        a = 10;
    }

    public Child() {
        System.out.println("子类构造方法，a：" + a);
        a = 20;
    }

    @Override
    protected void step() {
        System.out.println("child s: " + s + ", a：" + a);
    }

}
